/**
 *	\file AKCPPPlayerAdapter.mm
 *  
 *  \section desc_sec Description
 *  Description
 *  
 *  \if copyright
 *  	Copyright 2008 Ben Chen. All rights reserved.
 *  \endif
 *  
 *  \section hist_sec Change History:
 *  	-	2/21/08		BC		Created this file
 *  
 *  <hr>
 *  \addtogroup AnimalKingdom
 *  @{
 */

#import "AbstractClasses.h"
#import "AKCPPPlayerAdapter.h"

@interface AKCPPPlayerAdapter ()
@property (readwrite) AKMove		bestMove;
@end

@implementation AKCPPPlayerAdapter

@synthesize bestMove, player = model;

- (id)initWithSide:(AKSideIndex)anIndex 
	  numOfPlayers:(unsigned)playersCount {
	return self;
}

- (void)backToInitialState {
	model->backToInitialState();
}

- (void)thinkNextMove {
	[self setBestMove:model->getBestMove()];
}

- (BOOL)performMove:(AKMove)newMove {
	model->performMove(newMove);
	return YES;
}

- (AKSideIndex)side {
	return model->getSide();
}

@end

/** @} */
